﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        
        
public static int CountWordWithOutSpace(string value)
    {
        //Content Length-Content Description

        int length = 0;
        value = value.Trim();
        string value1 = (value);
        char[] lineDelimiters = { ' ', '\n', '\r' };
        string[] arr = value1.Split(lineDelimiters);
        length = arr.Length;
        int lgth = value.Length;
        return length;
    }

private void Form1_Load(object sender, EventArgs e)
{

}

private void textBox1_TextChanged(object sender, EventArgs e)
{

}

private void button1_Click(object sender, EventArgs e)
{
    lblwordcount.Text = CountWordWithOutSpace(txtrakesh.Text).ToString();
}

private void label1_Click(object sender, EventArgs e)
{

}

private void textBox1_TextChanged_1(object sender, EventArgs e)
{

}

private void button2_Click(object sender, EventArgs e)
{
    label1.Text =  textBox1.Text.Trim().Length.ToString();
}

private void label1_Click_1(object sender, EventArgs e)
{
//    la
}
        }
    }

